<{*积分明细*}>
<{include file="top_v2.html" }>
</head>
<body>

<div id="wrap" class="pt score-page">
	<div class="header">
		积分明细
		<a href="javascript:window.history.back();" class="back"></a>
		<a href="<{u(rule)}>" class="rule">规则</a>
	</div>

	<div class="container">
		<table>
			<thead>
			<tr>
				<th>时间</th>
				<th>详情</th>
				<th>积分</th>
			</tr>
			</thead>
			<tbody id="pointDetailList">
				<{include file="Point_v2/pointDetailItem.html" }>
			</tbody>
		</table>


	</div>
</div>



</body>
</html>
<script>

	//拖动加载
	var  flagData  =  true;
	var  flagAjax  =  true;
	var  page      =  2;
	//加载
	function  load_more(){
		$("#load_more").css({'background':'url("<{$preStaticUrl}>Wap/images/load.gif")  center  center  no-repeat;background-size:30px  30px;'});
		$("#load_more  span").html('正在加载...');
		if(!  flagAjax){
			return  false;
		}
		flagAjax  =  false;
		$.post("<{u('pointDetailMore')}>",{p:page} , function(data){
			flagAjax  =  true;
			if(data.data)  {

				$("#pointDetailList").append(data.data);
				$("#load_more  span").html('加载更多');
				page++;
				$("#load_more").css({'background':'url("<{$preStaticUrl}>Wap/images/load.gif")  center  center  no-repeat;background-size:30px  30px;'});
			} else {
				flagData  =  false;
				$("#load_container").html('<a  href="javascript:;"  id="load_more"><span>没有更多啦</span></a>');
				$("#load_more").css({'background':'url("")'}).css({'padding-top':'0'}).css({'top':'0px'}).css({'position':'relative'});
			}
		},'json');
	}
	var  tmp_scroll  =  0;
	//拖动加载
	$(".xy-panel-content").scroll(function(){
		if  (tmp_scroll  ==  $(this).height()  +  $(this).scrollTop())  {
			return;
		}
		tmp_scroll  =  $(this).height()  +  $(this).scrollTop();
		var  jia_scroll  =  $(this)[0].scrollHeight  -  tmp_scroll;
		if  (jia_scroll  <  100  &&  flagData)  {
			load_more();
		}
	});

</script>


